from datetime import datetime ,timedelta
def genDate():
    now = datetime.now()
    tomorrow=now+timedelta(days=1)
    date0=now.strftime("%m-%d")
    date1=tomorrow.strftime("%m-%d")
    return now,tomorrow,date0,date1

# def findDictfromList(ls,filter,onlyOne=True):
#     for item in ls:
#         allTrueflag=True
#         for k,v in filter.items():
#             if item[k]!=v:
#                 allTrueflag=False
#                 continue

#         if allTrueflag:
#             if onlyOne:
#                 return item
#             else

def modifyStrIndex(string:str,index,newChar):
    index=int(index)
    if index>len(string):raise IndexError('下表超过字符串长度！')
    newChar=str(newChar)
    ls=list(string)
    ls[index]=str(newChar)
    return ''.join(ls)